/*
 * @Description:
 * @Author: shilinzhou
 * @Date: 2024-02-28 18:01:10
 * @LastEditors: shilinzhou
 * @LastEditTime: 2024-03-15 17:08:53
 */
import type { BaseTableConfig } from '@/components/base-ui/base-table/type';
import { generateRandomId } from '@/utils';

export const modalMaterialUnitConfig: BaseTableConfig = {
    items: [
        {
            modelKey: 'productUnit',
            columnProps: {
                label: '生产单位',
                width: 140
            },
            elInputProps: {
                maxlength: '20',
                showWordLimit: true
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            modelKey: 'purchaseUnit',
            columnProps: {
                label: '采购单位',
                width: 140
            },
            elInputProps: {
                maxlength: '20',
                showWordLimit: true
            },
            validProps: {
                id: generateRandomId()
            }
        },
        {
            slotName: 'productPurchaseUnitRatio',
            modelKey: 'productPurchaseUnitRatio',
            columnProps: {
                label: '生产单位 : 采购单位',
                width: 300
            },
            validProps: {
                id: generateRandomId()
            },
            otherConfig: {
                tip: true,
                tipMsg: '若采购单位有值则当前项为必填项'
            }
        }
    ],
    actionProps: {
        width: 160
    },
    modalActionShow: true
};
